-- GENERATED SPELL FOR [Escaped Dreghood] --


function spell0_16836(pUnit, Event) --@Chain Lightning,n/a--
pUnit:FullCastSpellOnTarget(20831,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16836', 3000, 1)
end

function spell1_16836(pUnit, Event) --@Lightning Bolt,n/a--
pUnit:FullCastSpellOnTarget(20824,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16836', 3000, 1)
end

function spell2_16836(pUnit, Event) --@Slow,n/a--
pUnit:FullCastSpellOnTarget(11436,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16836', 10000, 1)
end

function Sorts_16836(pUnit, Event)
local choix_sorts_16836 = math.random(0, 2)
if choix_sorts_16836 == 0 then
pUnit:RegisterEvent('spell0_16836', 1, 1)
end
if choix_sorts_16836 == 1 then
pUnit:RegisterEvent('spell1_16836', 1, 1)
end
if choix_sorts_16836 == 2 then
pUnit:RegisterEvent('spell2_16836', 1, 1)
end
end

function mob16836_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_16836', math.random(1500, 3000), 1)
end

function mob16836_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16836_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16836_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(16836, 1, 'mob16836_Action')
RegisterUnitEvent(16836, 2, 'mob16836_Leave')
RegisterUnitEvent(16836, 3, 'mob16836_Kill')
RegisterUnitEvent(16836, 4, 'mob16836_Die')
